Skip to content

Conversation

@EcksDy
Copy link
Contributor

@EcksDy EcksDy commented Sep 25, 2025

Following this change:
zenstackhq/zenstack-v3#255

Summary by CodeRabbit

  • Documentation
    • Updated the computed fields guide to use modelAlias instead of currentModel across text, code examples, and comments.
    • Adjusted example callback parameters and sql.ref usage to reflect the new naming.
    • Improves clarity and alignment with current API conventions.
    • No functional changes to the product; this is a documentation-only update.

@vercel
Copy link

vercel bot commented Sep 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
zenstack-new-site Ready Ready Preview Comment Sep 25, 2025 0:25am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 25, 2025

Walkthrough

Documentation updates in computed fields: renames context property and example parameter from currentModel to modelAlias, adjusts sql.ref usage, and updates inline comments accordingly.

Changes

Cohort / File(s) Summary of Changes
Docs — ORM Computed Fields
versioned_docs/version-3.x/orm/computed-fields.md
Replaced references to currentModel with modelAlias in text, example callback parameter changed to { modelAlias }, and sql.ref updated from sql.ref(currentModel, 'id') to sql.ref(modelAlias, 'id'); updated related comments.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely summarizes the primary change by stating that currentModel was renamed to modelAlias in the computed-fields.md file, matching the actual modifications in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ccc7e99 and 15a1ca0.

📒 Files selected for processing (1)
  • versioned_docs/version-3.x/orm/computed-fields.md (2 hunks)
🔇 Additional comments (1)
versioned_docs/version-3.x/orm/computed-fields.md (1)

50-64: Rename aligns with the updated API context

The documentation now matches the upstream rename to modelAlias, and the example shows the correct usage of the context property with sql.ref. Looks good.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@ymc9 ymc9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix!

@ymc9 ymc9 merged commit addfdb3 into zenstackhq:main Sep 25, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants